class Stack {
  constructor() {
    this.items = {};
    this.count = 0;
  }
  push(val) {
    this.items[this.count] = val;
    this.count++;
  }
  isEmpty() {
    return this.count === 0;
  }
  size() {
    return this.count;
  }
}
let stack = new Stack();
stack.push(1);
console.log(stack);
console.log(stack.isEmpty());
